﻿<runtime:VisualPart
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:runtime="clr-namespace:ViewOnCore.Visual;assembly=ViewOnCore"
	xmlns:igWindows="http://infragistics.com/Windows"
    xmlns:igDP="http://infragistics.com/DataPresenter"
    xmlns:igEditors="http://infragistics.com/Editors"
	xmlns:mediadata="clr-namespace:ViewOnCore.HostContract.Media;assembly=ViewOnCore"
	xmlns:properties="clr-namespace:MediaDesktopPlayerAddIn.Properties"
	xmlns:wpf="clr-namespace:ViewOnCore.Helper.WPF;assembly=ViewOnCore"
    xmlns:vp="clr-namespace:UI.Control"
    x:Class="MediaDesktopPlayerAddIn.MediaDesktopPlayer"
	IsEnabled="True"
	Focusable="False">

	<runtime:VisualPart.Resources>

		<!-- Context menu -->
		<ContextMenu x:Key="VideoPartContextMenu">
			<MenuItem Header="{x:Static properties:Globalization.VideoPart_ContextMenu_AlignToGrid}"/>
			<MenuItem Header="{x:Static properties:Globalization.VideoPart_ContextMenu_OrganizeToGrid}"/>
			<Separator/>
			<MenuItem Header="{x:Static properties:Globalization.VideoPart_ContextMenu_RemoveSelection}"/>
		</ContextMenu>

	</runtime:VisualPart.Resources>

	<runtime:VisualPart.RenderTransform>
		<TransformGroup>
			<ScaleTransform ScaleX="1" ScaleY="1" />
			<RotateTransform Angle="0" />
			<TranslateTransform X="0" Y="0" />
		</TransformGroup>
	</runtime:VisualPart.RenderTransform>

	<Grid x:Name="griMain">
		<Grid.RowDefinitions>
			<RowDefinition Height="30"/>
			<RowDefinition />
			<RowDefinition Height="200"/>
		</Grid.RowDefinitions>

		<!-- Tool bar -->
		<Border Grid.Row="0" Margin="2,2,2,2" Background="{DynamicResource VOColor11}" CornerRadius="1" Opacity="0.5"/>
		<DockPanel x:Name="dpToolbar" Margin="7,0,7,0">

			<StackPanel Orientation="Horizontal" Height="30">
				<Button x:Name="btnLibrary" Margin="5,2,5,2" Grid.Column="1" Style="{DynamicResource Button.TransparentWithEffect2}" ToolTip="{x:Static properties:Globalization.VideoPart_TTLibrary}">
					<StackPanel Orientation="Horizontal">
						<wpf:Icon Source="/_images/PartVideo/library.png" Width="18" Height="18"/>
						<TextBlock Text="{x:Static properties:Globalization.VideoPart_Library}" Margin="5,0,5,0" VerticalAlignment="Center"/>
					</StackPanel>
				</Button>
			</StackPanel>
			<StackPanel HorizontalAlignment="Right" DockPanel.Dock="Right" Orientation="Horizontal">
				<wpf:Icon Source="/_images/PartVideo/zoom.png" Width="18" Height="18"  HorizontalAlignment="Right" VerticalAlignment="Center"/>
				<TextBox x:Name="txtZoom" Text="1.0" Width="35" VerticalAlignment="Center" Margin="5,0,0,0"/>
				<Slider x:Name="sliZoom" Grid.Column="1" Style="{StaticResource VolumeSliderTemplate}" Orientation="Horizontal" Width="150" Minimum="0.1" Maximum="1.3" Value="1" VerticalAlignment="Center" Margin="10,0,30,0" />
				<!--TextBlock Text="Search :" Grid.Column="2" Foreground="White" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,0,15,0"/>
				<TextBox x:Name="txtSearch" Grid.Column="3" Width="150" VerticalAlignment="Center" Margin="0,0,2,0"/>
				<Button Grid.Column="4" x:Name="btnSearch" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="0,0,10,0" >
					<Image Source="/_images/PartVideo/search.png" VerticalAlignment="Center" HorizontalAlignment="Center"/>
				</Button-->
			</StackPanel>

		</DockPanel>

		<!--Rectangle HorizontalAlignment="Stretch" Stroke="#FF000000" x:Name="recDesktop" Grid.Row="1" RenderTransformOrigin="0.49,0.74">
			<Rectangle.Fill>
				<RadialGradientBrush GradientOrigin="0.5,2.08">
					<RadialGradientBrush.RelativeTransform>
						<TransformGroup>
							<ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="9.217" ScaleY="1.28"/>
							<SkewTransform AngleX="0" AngleY="0" CenterX="0.5" CenterY="0.5"/>
							<RotateTransform Angle="0" CenterX="0.5" CenterY="0.5"/>
							<TranslateTransform X="0.027" Y="0.05"/>
						</TransformGroup>
					</RadialGradientBrush.RelativeTransform>
					<GradientStop Color="#FF000000" Offset="0"/>
					<GradientStop Color="#FFFFFFFF" Offset="1"/>
				</RadialGradientBrush>
			</Rectangle.Fill>
		</Rectangle-->

		<!--Canvas	x:Name="childWindowsCanvas"
				Grid.Row="1"
				Background="#00FFFFFF"
				HorizontalAlignment="Stretch"
				VerticalAlignment="Stretch"
				ClipToBounds="True">
			<ContentPresenter x:Name="contentPresenter"/>
		</Canvas-->

		<Grid Grid.Row="1">
			<Canvas	x:Name="childWindowsCanvas"
				Background="#00FFFFFF"
				HorizontalAlignment="Stretch"
				VerticalAlignment="Stretch"
				ClipToBounds="True">
				<ContentPresenter x:Name="contentPresenter"/>
			</Canvas>

			<Grid.LayoutTransform>
				<ScaleTransform x:Name="zoomTransform"
								ScaleX="{Binding ElementName=sliZoom, Path=Value}"
								ScaleY="{Binding ElementName=sliZoom, Path=Value}"/>
			</Grid.LayoutTransform>
		</Grid>

		<Grid Grid.Row="2">
			<Grid.RowDefinitions>
				<RowDefinition Height="18"/>
				<RowDefinition/>
			</Grid.RowDefinitions>
			<Border Margin="2,2,2,2" Background="{DynamicResource VOColor11}" CornerRadius="1" Opacity="0.5"/>
			<Button x:Name="btnExpand" Margin="12,2,2,2" Style="{StaticResource Button.Transparent}" HorizontalAlignment="Left">
				<Grid>
					<wpf:Icon x:Name="imgExpand" HorizontalAlignment="Right" Width="12" Height="12"  Source="/_images/controlpanel/expand.png" Visibility="Collapsed"/>
					<wpf:Icon x:Name="imgCollapse" HorizontalAlignment="Right" Width="12" Height="12"  Source="/_images/controlpanel/collapse.png"/>
				</Grid>
			</Button>

			<vp:VideoTagControl x:Name="videoTag" Grid.Row="1"/>
		</Grid>

	</Grid>
</runtime:VisualPart>
